const fs = require('fs')
// 文件操作路径
const path = require('path')

// fs.readFile(path.join(__dirname,'./a.txt'),'utf8',(err,data )=>{
//     if(err){
//         console.log(err);
//     }
//     console.log(data);
// })
console.log(path.parse(__filename))
console.log(path.dirname(__filename))
console.log(path.extname(__filename))
console.log(path.basename(__filename))

let p1 = 'E:/a/b/c/d/e/f'
let p2 = '\\b\\c\\a.txt'
console.log(path.join(p1,'./cd','/dd/','//cc//','.'));
console.log(path.join(p1,'./cd','/dd/','//cc//','.','..'));